package com.cs.core.exception;

/**
 * @package com.cs.core.exception
 * @className BusinessException
 * @note 业务异常
 * @author wind
 * @date 2020/12/9 23:40
 */
public class BusinessException extends RuntimeException {

    private final String message;

    public BusinessException(String message) {
        super(message);
        this.message = message;
    }

    public BusinessException(String message, Throwable cause) {
        super(message, cause);
        this.message = message;
    }

    public BusinessException(Throwable cause) {
        super(cause);
        this.message = cause.getMessage();
    }

    public String getErrMsg(){
        return this.message;
    }

}
